﻿using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Ekton_Manage_Web.Extensions.ServiceCollectionExtensions
{
    /// <summary>
    /// MiniProfiler 启动服务
    /// </summary>
    public static class MiniProfilerSetup
    {
        public static void AddMiniProfilerSetup(this IServiceCollection services)
        {
            if (services == null) throw new ArgumentNullException(nameof(services));

            // 3.x使用MiniProfiler，必须要注册MemoryCache服务
            services.AddMiniProfiler(options =>
            {
                options.RouteBasePath = "/profiler";
            }
           );
        }
    }
}
